home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / pc / DirectX SDK / DXSDK / samples / Multimedia / Direct3D / StencilBuffer / StencilMirror / readme.txt < prev    next >
Encoding:
Text File  |  2001-10-10  |  2.2 KB  |  55 lines

  1. //-----------------------------------------------------------------------------
  2. // Name: StencilMirror Direct3D Sample
  3. // 
  4. // Copyright (c) 1998-2001 Microsoft Corporation. All rights reserved.
  5. //-----------------------------------------------------------------------------
  6.  
  7.  
  8. Description
  9. ===========
  10.    The StencilMirror sample uses stencil buffers to implement a mirror effect.
  11.    In the sample, a watery terrain scene is rendered with the water reflecting
  12.    a helicopter that flies above.
  13.  
  14.    Stencil buffers are a depth buffer technique that can be updated as
  15.    geometry is rendered, and used again as a mask for drawing more geometry.
  16.    Common effects include mirrors, shadows (an advanced technique), dissolves,
  17.    etc..
  18.  
  19.    Note that not all cards support all features for all the various stencil
  20.    buffer techniques (some hardware has no, or limited, stencil buffer
  21.    support). For more information on stencil buffers, refer to the DirectX SDK
  22.    documentation. 
  23.  
  24.  
  25. Path
  26. ====
  27.    Source:     DXSDK\Samples\Multimedia\D3D\StencilBuffer\StencilMirror
  28.    Executable: DXSDK\Samples\Multimedia\D3D\Bin
  29.  
  30.  
  31. User's Guide
  32. ============
  33.    The following keys are implemented. The dropdown menus can be used for the
  34.    same controls.
  35.       <Enter>     Starts and stops the scene
  36.       <Space>     Advances the scene by a small increment
  37.       <F1>        Shows help or available commands.
  38.       <F2>        Prompts user to select a new rendering device or display mode
  39.       <Alt+Enter> Toggles between fullscreen and windowed modes
  40.       <Esc>       Exits the app.
  41.  
  42.  
  43. Programming Notes
  44. =================
  45.    In this sample, a stencil buffer is used to create the effect of a 
  46.    reflection coming off the water. The geometry of the water is rendered into
  47.    the stencil buffer. Then, the stencil buffer is used as a mask to render the
  48.    scene again, this time with the geometry translated and rendered upside
  49.    down, to appear as if it was reflected in the mirror.
  50.  
  51.    This sample makes use of common DirectX code (consisting of helper functions,
  52.    etc.) that is shared with other samples on the DirectX SDK. All common
  53.    headers and source code can be found in the following directory:
  54.       DXSDK\Samples\Multimedia\Common
  55.